package com.zjuee.base.dto.common.ledger;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zjuee.base.base.Converter;
import com.zjuee.base.bean.Pages;
import com.zjuee.base.model.common.ledger.LedgerDisposeGather;
import lombok.*;
import org.springframework.beans.BeanUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class LedgerDisposeGatherDto extends LedgerDisposeGather implements Converter<LedgerDisposeGather, LedgerDisposeGatherDto> {

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Pages page;

	@Override
	public void convertToDo(LedgerDisposeGather ledgerDisposeGather) {
		BeanUtils.copyProperties(this, ledgerDisposeGather);
	}

	@Override
	public LedgerDisposeGatherDto convert(LedgerDisposeGather ledgerDisposeGather) {
		BeanUtils.copyProperties(ledgerDisposeGather, this);
		return this;
	}

}
